/*
 *------------------------------------------------------------------------------
 * @File      :    ei_mai_sys_define.h
 * @Date      :    2021-4-8
 * @Author    :    lomboswer <lomboswer@lombotech.com>
 * @Brief     :    Media Interface for MADP(Media Development Platform).
 *
 * Copyright (C) 2020-2021, LomboTech Co.Ltd. All rights reserved.
 *------------------------------------------------------------------------------
 */

#ifndef __EI_MAI_SYS_DEF_H__
#define __EI_MAI_SYS_DEF_H__

#ifdef __cplusplus
#if __cplusplus
extern "C" {
#endif
#endif

#include "ei_common.h"
#include "ei_comm_vbuf.h"
#include "ei_defines.h"
#include "ei_mai_comm_define.h"

#define EI_MAI_VBUF_MAX_POOLS		VBUF_MAX_COMM_POOLS

typedef struct eiMAI_FRAME_INFO {
    EI_U32                      u32Width;
    EI_U32                      u32Height;
    EI_U32                      u32Align;
    EI_MADP_PIXEL_FORMAT_E      enPixelFormat;
} EI_MAI_FRAME_INFO;

typedef struct eiMAI_VBUF_POOL_CONFIG_S {
    union {
        EI_MAI_FRAME_INFO astFrameInfo;
        EI_MAI_FRAME_INFO astFrameInfoArray[VBUF_MAX_FRM_INFO_ARRAY];
        ABUF_FRAME_INFO_S astAudioFrameInfo;
    };
    EI_MADP_MOD_ID_E astMode;
    EI_U32 u32BufCnt;
    EI_U32 u32FrameInfoCnt;
    VBUF_FRAME_INFO_TYPE_E enFrmInfoType;
    EI_UL u32PoolId;
} EI_MAI_VBUF_POOL_CONFIG_S;

typedef struct eiMAI_VBUF_CONFIG_S {
    EI_U32 u32PoolCnt;
    EI_MAI_VBUF_POOL_CONFIG_S astPool[VBUF_MAX_COMM_POOLS];
} EI_MAI_VBUF_CONFIG_S;

#ifdef __cplusplus
#if __cplusplus
}
#endif
#endif

#endif

